#include "e2d/core/render/LightEnv.h"

void e2d::LightEnv::OnLoad()
{
	ztclog::info("light env init");
	m_IrradianceMap.OnLoad();
	m_PrefilterMap.OnLoad();
	m_brdfLUTMap.OnLoad();

}

void e2d::LightEnv::InitLight() const
{
	//uniform samplerCube irradianceMap;
	//uniform samplerCube prefilterMap;
	//uniform sampler2D brdfLUT;

	if (m_IrradianceMap.m_Value)
	{
		m_IrradianceMap.m_Value->SetShader(0);
	}
	if (m_PrefilterMap.m_Value)
	{
		m_PrefilterMap.m_Value->SetShader(1);
	}
	if (m_brdfLUTMap.m_Value)
	{
		m_brdfLUTMap.m_Value->SetShader(2);
	}
}
